package com.java.comprehensive.design.building_modelling.abstract_factory_pattern.cainiao;

/**
 * @program: comprehensive-service
 *
 * @description: 工厂生成器
 *
 * @author: 窦绍飞
 *
 * @create: 2021-11-24 15:43
 **/
public class FactoryProducer {

	public static String COLOR = "color";
	public static String SHAPE = "shape";

	public static AbstractFactory getFactory(String choice) {
		if (choice.equals(FactoryProducer.COLOR)) {
			return new ColorFactory();
		} else if (choice.equals(FactoryProducer.SHAPE)) {
			return new ShapeFactory();
		} else {
			return null;
		}

	}
}
